﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Users.aspx.cs" Inherits="App.Account.Views.Admin.Users" %>
<%@ Import Namespace="App.Account.Controllers" %>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%= Html.Encode(ViewData["Message"]) %></h2>
    <table>
        <thead>
            <tr>
                <th>
                    ID
                </th>
                <th>
                    Name
                </th>
            </tr>
        </thead>
        <tbody>
            <% foreach (var user in ViewData.Model.Page)
               { %>
            <tr>
                <td>
                    <%= user.ID %>
                </td>
                <td>
                    <%= user.Name %>
                </td>
                <td>
                    <%= Html.ActionLink<AccountAdminController>(c => c.EditUser(user.ID),"Edit",null)%>
                </td>
                <td>
                    <%= Html.ActionLink<AccountAdminController>(c => c.DeleteUser(user.ID),"Delete",null)%>
                </td>
                <% } %>
            </tr>
        </tbody>
    </table>
</asp:Content>
